import service from '@/utils/request'


// 搜索报废单
export function SearchDestoryStore(data) {
  return service.request({
    method: 'post',
    url: '/destroy/selectByAll.do',
    data
  })
}

// 报废信息上传
export function DestoryStore(data) {
  return service.request({
    method: 'post',
    url: '/destroy/insert.do',
    data
  })
}
// 查看所有报废单
export function GetDestoryOrder(data) {
  return service.request({
    method: 'post',
    url: '/destroy/findDestroyAll.do',
    data
  })
}
// 删除报废单
export function DelDestoryOrder(data) {
  return service.request({
    method: 'get',
    url: '/destroy/deleteDestroyById.do?destroyId='+data,
  })
}
// 根据ID查看报废单
export function FindDestoryOrderById(data) {
  return service.request({
    method: 'get',
    url: '/destroy/findOutAll.do?destroyId='+data,
  })
}
// 根据ID修改报废单
export function UpdateDestoryOrder(data) {
  return service.request({
    method: 'post',
    url: '/destroy/updateDestroydetails.do',
    data
  })
}

// 提交报废单
export function SubmitDestoryOrder(data) {
  return service.request({
    method: 'get',
    url: '/destroy/submitAddDestroydetails.do?destroyId='+data,
  })
}
